var global = {
  resizeFunc: []
};

function registerResize(func) {
  global.resizeFunc.push(func);
}

function onResize() {
  var $win = $(window);
  global.winWidth = global.W = $win.width();
  global.winHeight = global.H = $win.height();

  _.each(global.resizeFunc, function(func) {
    try {
      func.call();
    } catch (e) {}
  });
}

$(function() {
  onResize();
  $(window).resize(onResize);
  $('.zp-head').imagefill();
});